package com.twu.biblioteca.Constants;

/**
 * Created by aruna on 26/4/14.
 */
public class RatingConstants {
    public static boolean isValidRating(String Rating)
    {
        if(Rating.equals("UNRATED"))
            return true;
        try
        {
            int ratingAsInt=Integer.parseInt(Rating);
            if(ratingAsInt<10 && ratingAsInt>=1)
                return true;
        }
        catch(NumberFormatException e)
        {
            return false;
        }
        return false;
    }

}
